﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="FrmActualizarCliente.aspx.cs" Inherits="PharmacyWeb.Ventas.FrmActualizarCliente" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <asp:FormView ID="fvproveedor" DefaultMode="Edit" ItemType="PharmacyBussinesEntities.Cliente" 
        SelectMethod="GetCliente" 
        UpdateMethod="ActualisarCliente"  
        InsertMethod="InsertCliente"
        runat="server"  >
        <EditItemTemplate>
            <fieldset>
                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <h2 class="panel-title"> EDITAR CLIENTE </h2>
                    </div>
                    <div class="panel-body">
                        <div class="form-group">
                            <label class="col-sm-6 control-label ">Id: </label>
                            <div class="col-sm-6">
                                <asp:TextBox ID="TxtId" Text="<%#BindItem.Id %>" runat="server" CssClass="form-control"></asp:TextBox>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-6 control-label ">Nombre: </label>
                            <div class="col-sm-6">
                                <asp:TextBox ID="txtNombre" Text="<%#BindItem.Nombres%>" runat="server" CssClass="form-control"></asp:TextBox>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-6 control-label ">Apellidos: </label>
                            <div class="col-sm-6">
                                <asp:TextBox ID="txtapellidos" Text="<%#BindItem.Apellidos%>" runat="server" CssClass="form-control"></asp:TextBox>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-6 control-label ">Direccion: </label>
                            <div class="col-sm-6">
                                <asp:TextBox ID="txtdireccion" Text="<%#BindItem.Direccion%>" runat="server" CssClass="form-control"></asp:TextBox>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-6 control-label ">DNI: </label>
                            <div class="col-sm-6">
                                <asp:TextBox ID="txtdni" Text="<%#BindItem.DNI%>" runat="server" CssClass="form-control"></asp:TextBox>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-4"><asp:Button ID="btnGuardar" Text="Guardar" CssClass="btn btn-success btn-sm" CommandName="update"  runat="server"/></div>
                            <div class="col-sm-4"><a href="FrmBuscarCliente.aspx" class="btn btn-danger">Cancelar </a></div>
                        </div>
                    
                </div>
            </fieldset>
        </EditItemTemplate>
        <InsertItemTemplate>
            <fieldset>
                <div class="panel-primary">
                <div class="panel-heading">
                    <h2 class="panel-title">AGREGAR CLIENTE</h2>
                </div>
                    <div class="panel-body">
                        <div class="form-group">
                            <label class="col-sm-6 control-label ">Id: </label>
                            <div class="col-sm-6">
                                <asp:TextBox ID="TxtId" ReadOnly="True" Text="666" runat="server" CssClass="form-control"></asp:TextBox>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-6 control-label ">Nombre: </label>
                            <div class="col-sm-6">
                                <asp:TextBox ID="txtNombre" Text="<%#BindItem.Nombres%>" runat="server" CssClass="form-control"></asp:TextBox>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-6 control-label ">Apellidos: </label>
                            <div class="col-sm-6">
                                <asp:TextBox ID="txtapellidos" Text="<%#BindItem.Apellidos%>" runat="server" CssClass="form-control"></asp:TextBox>
                            </div>
                       </div>
                        <div class="form-group">
                            <label class="col-sm-6 control-label ">Direccion: </label>
                            <div class="col-sm-6">
                                <asp:TextBox ID="txtdireccion" Text="<%#BindItem.Direccion%>" runat="server" CssClass="form-control"></asp:TextBox>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-6 control-label ">DNI: </label>
                            <div class="col-sm-6">
                                <asp:TextBox ID="txtdni" Text="<%#BindItem.DNI%>" runat="server" CssClass="form-control"></asp:TextBox>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-4"><asp:Button ID="btnGuardar" Text="Guardar" CssClass="btn btn-success btn-sm" CommandName="insert"  runat="server"/></div>
                            <div class="col-sm-4"><a href="FrmBuscarCliente.aspx" class="btn btn-danger">Cancelar </a></div>
                        </div>
                        <asp:ValidationSummary ID="ValidationSummary1" 
                     runat="server" 
                     ShowModelStateErrors="true" />
            </fieldset>
        </InsertItemTemplate>
    </asp:FormView>
</asp:Content>
